﻿namespace SenGe.Domain
{
    /// <summary>
    /// 用户传输模型
    /// </summary>
    public class DtoSenUser : BaseLongIdEntity
    {
        /// <summary>
        /// 用户昵称
        /// </summary>
        public required string Name { get; set; }
        /// <summary>
        /// 登录用户名
        /// </summary>
        public required string UserName { get; set; }
        /// <summary>
        /// 登录用户密码
        /// </summary>
        public required string PassWord { get; set; }
        /// <summary>
        /// 用户头像
        /// </summary>
        public string? Avatar { get; set; }
    }

    /// <summary>
    /// 当前登录用户Dto
    /// </summary>
    public class DtoCurrentUser : BaseLongIdEntity
    {
        /// <summary>
        /// 用户昵称
        /// </summary>
        public string? Name { get; set; }
        /// <summary>
        /// 用户头像
        /// </summary>
        public string? Avatar { get; set; } = "/images/defaultavatar.png";
    }

    /// <summary>
    /// 修改密码模型
    /// </summary>
    public class ChangePwdModel
    {
        /// <summary>
        /// 原密码
        /// </summary>
        public string? OldPassword { get; set; }
        /// <summary>
        /// 新密码
        /// </summary>
        public string? NewPassword { get; set; }
        /// <summary>
        /// 确认新密码
        /// </summary>
        public string? ConfirmPassword { get; set; }
    }

    /// <summary>
    /// 用户注册检查结果
    /// </summary>
    public enum UserRegisterCheckResult
    {
        /// <summary>
        /// 检查无误
        /// </summary>
        Success = 0,
        /// <summary>
        /// 用户昵称已存在
        /// </summary>
        NameExists = 1,
        /// <summary>
        /// 用户登录名已存在
        /// </summary>
        UserNameExists = 2,
        /// <summary>
        /// 手机号码已存在
        /// </summary>
        PhoneExists = 3,
        /// <summary>
        /// 数据为空
        /// </summary>
        DataIsEmpty = 4,
    }
}
